/**
 * 获取全部频道
 */

import request from '@/utils/request.js'

export const getAllChannels = () => {
  return request({
    method: 'GET',
    url: '/v1_0/channels'
  })
}

/**
 * 添加用户频道
 */
export const addUserChannel = channels => {
  return request({
    method: 'PATCH',
    url: '/v1_0/user/channels',
    data: { channels }
  })
}

/**
 * 删除用户频道数据
 * */
export const delUserChannel = id => {
  return request({
    url: '/v1_0/user/channels/' + id,
    method: 'DELETE'
  })
}
